<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text " name="admin">
    <script>
        let inpts=document.querySelector(`[name="admin"]`);
        // console.log(inpts);

        //(?!.*唐玮.*)表示前后不能有唐玮，只是限定作用(不看 ^)
        let reg=/^(?!.*唐玮.*).*/;
        inpts.addEventListener("keyup",(v)=>{
            let value=v.target.value;
            console.log(value.match(reg));
        })
    </script>
</body>
</html>